#pragma once

#include <src/data/Polynomials.h>
#include <src/data/ParticleSet.h>

template<class data, class container > 
struct polynomial_example{
	typedef polynomial<data,container> polynomialdp;
	polynomial_example(){
		std::cout << std::endl << "----start polynomial_examples---------------------" << std::endl ;
		polynomialdp x = polynomial_canonical_base<polynomialdp>()[1];
		polynomialdp pol_test = (x-1)*(x-2)*(x-3)*(x-4);
		std::cout << "test algebra for polynomial (x-1)*(x-2)*(x-3)*(x-4) \n";
		std::cout << "canonical base \n" << pol_test;
		std::cout << "\n test evaluation for polynomial ((x-1)*(x-2)*(x-3)*(x-4) ";
		std::cout << "\n at 0 "<< pol_test(0);
		std::cout << "\n at 1 "<< pol_test(1);
		std::cout << "\n at 2 "<< pol_test(2);
		std::cout << "\n at 3 "<< pol_test(3);
		std::cout << "\n at 4 "<< pol_test(4);
		std::cout << "\n at 5 "<< pol_test(5);
		std::cout << "\n test derivative for polynomial (x-1)*(x-2)*(x-3.)*(x-4.) \n" << pol_test.get_derivative();
		std::cout << "\n test integral for polynomial ((x-1)*(x-2)*(x-3.)*(x-4.) \n" << pol_test.get_integral();
		std::cout << std::endl << "----end polynomial_examples---------------------" ;
		std::cout << std::endl << "------------------------------------------------" << std::endl;
	}
};

void polynomial_test();

